package com.xunce.xcworkservice.controller;

import com.xunce.xcworkservice.entity.Project;
import com.xunce.xcworkservice.response.R;
import com.xunce.xcworkservice.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yanlong.guo
 */
@RestController
@RequestMapping("/project")
public class ProjectController {

    @Autowired
    private ProjectService projectService;

    @GetMapping("/getList")
    public R getList(){
        List<Project> projects = projectService.list();
        return R.success();
    }
}
